package com.xju.edu;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.io.IOException;

public class TestDemo {
    @Test
    public void test01() throws IOException {

        ApplicationContext ac = new ClassPathXmlApplicationContext("applicationContext.xml");
        Demo demo = (Demo) ac.getBean("demo");
        System.out.println(demo);
        ((ClassPathXmlApplicationContext) ac).close();
    }
}
